﻿namespace Cavy.UdpClient.Serializable
{
    public static class NetDataWriterExtension
    {
        public static void Put(this NetDataWriter writer, System.Span<int> array)
        {
            foreach (var v in array)
            {
                writer.Put(v);
            }
        }
        
        public static void Put(this NetDataWriter writer, int value1, int value2)
        {
            writer.Put(value1);
            writer.Put(value2);
        }
        
        public static void Put(this NetDataWriter writer, int value1, int value2, int value3)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
        }
        
        public static void Put(this NetDataWriter writer, int value1, int value2, int value3, int value4)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
        }
        
        public static void Put(this NetDataWriter writer, int value1, int value2, int value3, int value4, int value5)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
            writer.Put(value5);
        }
        
        public static void Put(this NetDataWriter writer, int value1, int value2, int value3, int value4, int value5, int value6)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
            writer.Put(value5);
            writer.Put(value6);
        }
        
        public static void Put(this NetDataWriter writer, System.Span<float> array)
        {
            foreach (var v in array)
            {
                writer.Put(v);
            }
        }
        
        public static void Put(this NetDataWriter writer, float value1, float value2)
        {
            writer.Put(value1);
            writer.Put(value2);
        }
        
        public static void Put(this NetDataWriter writer, float value1, float value2, float value3)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
        }
        
        public static void Put(this NetDataWriter writer, float value1, float value2, float value3, float value4)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
        }
        
        public static void Put(this NetDataWriter writer, float value1, float value2, float value3, float value4, float value5)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
            writer.Put(value5);
        }
        
        public static void Put(this NetDataWriter writer, float value1, float value2, float value3, float value4, float value5, float value6)
        {
            writer.Put(value1);
            writer.Put(value2);
            writer.Put(value3);
            writer.Put(value4);
            writer.Put(value5);
            writer.Put(value6);
        }
    }
}